JEE math solution